1. Field of the Invention
The present invention relates to an outline font compression method, and to a decompression method, for reducing a data size of an outline font by improving a compression ratio by means of a statistical compression method utilizing a fact of an occurrence of difference in appearance frequency of a value in the case of expressing respective coordinate values of both ends of a line by a difference depending on a kind of the line.
2. Description of the Related Art
As a first of a conventional techniques for minimizing a data size of an outline font by using a statistical compression method, a patent document 1 listed below notes a font data compression method that predicts a control point of a curve part and compresses by using a relative value against the predicted point in order to further improve a compression efficiency based on a premise on compressing a relative value of a coordinate value from a last control point by means of a Huffman method or such.
Likewise, as a second of a conventional techniques for minimizing a data size of an outline font by using a statistical compression method, a patent document 2 listed below notes a font data compression method that minimizes a data size of an outline font by performing processes such as removing an offset of data, converting data into a notation system of base X, and predicting coordinate data by using a linear method and an error correction method, thereby reducing a memory volume.
FIG. 1A is a diagram showing an outline configuration of a font data compression system according to the aforementioned conventional technique; and FIG. 1B is a diagram showing an outline configuration of a font data decompression system according to the aforementioned conventional technique. Referring to FIG. 1A, the conventional font data compression system comprises an outline data file 111 for storing outline font data, an outline font data readout unit 112 for reading the outline font data from the outline data file 111, a line category judgment unit 113 for judging a line category from readout line category data, a line category data statistics obtainment unit 114 for obtaining a statistics of the judged line categories, a line category coding unit 115 for performing a line category coding based on line category appearance frequency distribution data, a coded line category output unit 116 for outputting a coded line category, a coordinate prediction unit 117 for predicting a coordinate of the line category based on readout coordinate data, an error calculation unit 118 for calculating an error against the predicted value based on readout coordinate data, a coordinate value coding unit 119 for coding a coordinate value corrected by a calculated error, a coded coordinate value output unit 120 for outputting a coded coordinate value, and a compression outline font data file 121 for storing a coded line category and a coded coordinate value that are respectively output.
Referring to FIG. 1B, the conventional font data decompression system comprises a compressed outline data file 131 for storing compressed font data compressed by the font data compression system noted above, a compressed outline font data readout unit 132 for reading the compressed outline font data, a data decoding unit 133 for decoding line category data and coordinate data from the readout compressed outline data, a line category judgment unit 134 for judging the line category from the decoded line category data, a coordinate prediction unit 135 for predicting a coordinate by using the decoded coordinate data, and an error correction unit 136 for correcting an error against a prediction value and outputting a post-correction coordinate value. The judged and output line category and the error-corrected and output coordinate value are respectively input to a figure drawing unit 140 that in turn draws a figure based on the input data.
The font data compression and decompression systems according to the conventional technique for predicting a coordinate as described above are required to carry out a process for calculating an angle between lines for predicting a point appearing next at the time of a compression, and that for calculating a coordinate by using the angle, and moreover, is necessary to perform these processes at the time of drawing a figure that requires a real time process, and therefore is not efficient in terms of speed for equipment such as a portable phone.
Meanwhile, a prediction of coordinates not only makes it impossible to obtain an effect of a compression by the prediction but also fails to prevent a degradation of a compression ratio in cases other than one in which a pair of straight lines intersects with each other at about the same angle and the distance between the straight lines is about the same.
Patent document 1: Laid-Open Japanese Patent Application Publication No. H05-94526
Patent document 2: Laid-Open Japanese Patent Application Publication No. H05-143048